package tp

const (
	PerionUnitDefault = "天"
)

type TpResponse struct {
	Id                int    `json:"id"`
	ImageCovr         string `json:"image_covr"`         //显示图片封面
	Title             string `json:"title"`              //标题
	LearningFrequency int    `json:"learning_frequency"` //学习次数
	Cycle             int    `json:"cycle"`              //周期
	PeriodUnit        string `json:"period_unit"`        //周期单位
	LearnUrl          string `json:"learn_url"`          //立即学习的视频地址
	Tag               int    `json:"tag"`                //分类类型
}

func NewTpResponse(id int,imageCovr string, title string, learningFrequency int, cycle int, learnUrl string) *TpResponse {
	return &TpResponse{Id:id,ImageCovr: imageCovr,
		Title: title, LearningFrequency: learningFrequency, Cycle: cycle, LearnUrl: learnUrl,
		PeriodUnit: PerionUnitDefault,
	}
}
